package com.ruoyi.refundincome.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.refundincome.mapper.HouseContrctRefundIncomeMapper;
import com.ruoyi.refundincome.domain.HouseContrctRefundIncome;
import com.ruoyi.refundincome.service.IHouseContrctRefundIncomeService;

/**
 * 退单记录Service业务层处理
 * 
 * @author hct
 * @date 2022-03-01
 */
@Service
public class HouseContrctRefundIncomeServiceImpl implements IHouseContrctRefundIncomeService 
{
    @Autowired
    private HouseContrctRefundIncomeMapper houseContrctRefundIncomeMapper;

    /**
     * 查询退单记录
     * 
     * @param id 退单记录主键
     * @return 退单记录
     */
    @Override
    public HouseContrctRefundIncome selectHouseContrctRefundIncomeById(Long id)
    {
        return houseContrctRefundIncomeMapper.selectHouseContrctRefundIncomeById(id);
    }

    /**
     * 查询退单记录列表
     * 
     * @param houseContrctRefundIncome 退单记录
     * @return 退单记录
     */
    @Override
    public List<HouseContrctRefundIncome> selectHouseContrctRefundIncomeList(HouseContrctRefundIncome houseContrctRefundIncome)
    {
        return houseContrctRefundIncomeMapper.selectHouseContrctRefundIncomeList(houseContrctRefundIncome);
    }

    /**
     * 新增退单记录
     * 
     * @param houseContrctRefundIncome 退单记录
     * @return 结果
     */
    @Override
    public int insertHouseContrctRefundIncome(HouseContrctRefundIncome houseContrctRefundIncome)
    {
        houseContrctRefundIncome.setCreateTime(DateUtils.getNowDate());
        return houseContrctRefundIncomeMapper.insertHouseContrctRefundIncome(houseContrctRefundIncome);
    }

    /**
     * 修改退单记录
     * 
     * @param houseContrctRefundIncome 退单记录
     * @return 结果
     */
    @Override
    public int updateHouseContrctRefundIncome(HouseContrctRefundIncome houseContrctRefundIncome)
    {
        houseContrctRefundIncome.setUpdateTime(DateUtils.getNowDate());
        return houseContrctRefundIncomeMapper.updateHouseContrctRefundIncome(houseContrctRefundIncome);
    }

    /**
     * 批量删除退单记录
     * 
     * @param ids 需要删除的退单记录主键
     * @return 结果
     */
    @Override
    public int deleteHouseContrctRefundIncomeByIds(Long[] ids)
    {
        return houseContrctRefundIncomeMapper.deleteHouseContrctRefundIncomeByIds(ids);
    }

    /**
     * 删除退单记录信息
     * 
     * @param id 退单记录主键
     * @return 结果
     */
    @Override
    public int deleteHouseContrctRefundIncomeById(Long id)
    {
        return houseContrctRefundIncomeMapper.deleteHouseContrctRefundIncomeById(id);
    }
}
